home *** CD-ROM | disk | FTP | other *** search
- /***************************************************
- HTBMeter.dll
-
- DialogThread.cpp
-
- Copyright TransEra Corporation 1999
- ***************************************************/
-
- #include "stdafx.h"
- #include "HTBmeter.h"
- #include "DialogThread.h"
- #include "MeterDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
-
- #endif
-
-
- extern MeterDlg * g_MeterVar; // used to hold pointer to dialog box outside of new thread
-
- IMPLEMENT_DYNCREATE(DialogThread, CWinThread)
-
- DialogThread::DialogThread()
- {
- }
-
- DialogThread::~DialogThread()
- {
- }
- /////////////////////////////////////////////////////////////////////////////
- /*
- Function: DialogThread::InitInstance
-
- Description: Intializations and start of Dialog
-
- Return type: BOOL
-
- Notes: A modal is performed on the Meter class,
- this in turn starts the window on a seperate
- thread which is seen in DialogThread.cpp.
-
- */
- BOOL DialogThread::InitInstance()
- {
- MeterDlg Dlg; // dialog box
- g_MeterVar = &Dlg; // save pointer to new dialog box for use outside this thread
- Dlg.DoModal(); // put in on the screen
- return TRUE;
- }
-
-
-
- /////////////////////////////////////////////////////////////////////////////
- /*
- Function: DialogThread::ExitInstance
-
- Description: Closes Thread and app window
-
- Return type: int
-
- Notes: returns the thread information so that the thread can be
- nicely shut.
-
- */
- int DialogThread::ExitInstance()
- {
- return CWinThread::ExitInstance();
- }
-
- BEGIN_MESSAGE_MAP(DialogThread, CWinThread)
- //{{AFX_MSG_MAP(DialogThread)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
-